package com.qf.smsplatform.pojo;


public class TSearchParmas implements CheckNull {

  private Long id;
  private String name;
  private String cloum;
  private String type;
  private Long tOrder;
  private Long state;


  public Long getId() {
    return id;
  }

  public void setId(Long id) {
    this.id = id;
  }


  public String getName() {
    return name;
  }

  public void setName(String name) {
    this.name = name;
  }


  public String getCloum() {
    return cloum;
  }

  public void setCloum(String cloum) {
    this.cloum = cloum;
  }


  public String getType() {
    return type;
  }

  public void setType(String type) {
    this.type = type;
  }


  public Long getTOrder() {
    return tOrder;
  }

  public void setTOrder(Long tOrder) {
    this.tOrder = tOrder;
  }


  public Long getState() {
    return state;
  }

  public void setState(Long state) {
    this.state = state;
  }

  @Override
  public boolean isNull(CheckType type) {
    switch (type){
      case DELETE:
        return getId()==null;
      case UPDATE:
        return getId()==null||getCloum().isEmpty()||getName().isEmpty()||getState()==null||getTOrder()==null||getType().isEmpty();
      case ADD:
        return getCloum().isEmpty()||getName().isEmpty()||getState()==null||getTOrder()==null||getType().isEmpty();
    }
    return false;
  }
}
